﻿{% extends "base.html" %}
{% load tags %}
{% block title %}Firmos vadovybės ataskaita{% endblock %}
{% block pickDate %}{% include "monthPicker.html" %}{% endblock %}
{% block content %}
<h1 class="headerText">Skyrių ataskaita</h1>
<table class="sortable reportTable" >
  <thead>
    <tr>
      <th sort_index="0" rowspan="2">Skyriaus numeris</th>
      <th sort_index="1" rowspan="2">Skyrius</th>
      <th sort_index="2" rowspan="2">Skyriaus vadovas</th>
      <th sort_index="3" rowspan="2">Išdirbta (val.)</th>
      <th colspan="2">Neišdirbta</th>
    </tr>
    <tr>
      <th sort_index="4">val.</th>
      <th sort_index="5">%</th>
    </tr>
  </thead>
  <tbody>
    {% for d in department %}
    <tr class="{{ forloop.counter|oddOrEven }}">
      <td><a href="/department/manager/{{ d.departmentId }}">{{ d.departmentId }}</a></td>
      <td><a href="/department/manager/{{ d.departmentId }}">{% firstof d.department d.departmentId %}</a></td>
      <td><a href="/department/manager/{{ d.departmentId }}">{{ d.manager }}</a></td>
      <td>{{ d.total }}</td>
      <td>{{ d.freetime }}</td>
      <td>{% ifequal d.freepercent None %}&#8734;{% else %}{{ d.freepercent|floatformat:1 }}{% endifequal %}</td>
    </tr>
    {% endfor %}
  </tbody>
</table>
{% endblock %}
